package org.henau.EmergencyHandlerChain;

// 7. 安全系统主类 (SafetySystem.java)
public class SafetySystem {
    public static void main(String[] args) {
        EmergencyHandlerChain chain = new EmergencyHandlerChain();

        // 模拟障碍物事件
        chain.processEvent(new EmergencyEvent(EmergencyType.OBSTACLE, "OBJ-202"));

        // 模拟急停事件
        chain.processEvent(new EmergencyEvent(EmergencyType.EMERGENCY_STOP, "STP-911"));

        // 模拟未知类型事件
        chain.processEvent(new EmergencyEvent(EmergencyType.LOW_BATTERY, "BAT-15"));
    }
}